import { createBrowserRouter } from "react-router-dom";
import Layout from "../pages/Layout";

const router = createBrowserRouter([
    {
        path: "/",
        element: <Layout />,
        loader: () => {
            return new Promise((resolve) => {
                const data = ["吃饭", "上网", "打豆豆"];
                setTimeout(() => {
                    resolve(data);
                }, 3000);
            });
        },
    },
]);

export default router;
